<?php defined('SYSPATH') or die('No direct script access.');
	
	include ("media/soap/synchclasses/webservice_classes.php");

	class Controller_ClientWebService extends Controller {
		
		public function action_index(){
			$wsdl = "http://diastole/diastole/media/soap/systoleSync.wsdl";
			//$wsdl = "http://v2.fidely.net:8080/axis2/services/FidelyNetWSDemov1_1_7?wsdl";
	    	$client = new SoapClient($wsdl ,array("trace"      => 1,  "exceptions" => 0));
	
	    	$functions = $client->__getFunctions();
		    foreach($functions as $function)
		    {
		        print_r($function);
		    }
	
	    	$client->DoSomething('test');
	
		    print "<pre>";
		    print "Request :\n".htmlspecialchars($client->__getLastRequest()) ."\n";
		    print "Response:\n".htmlspecialchars($client->__getLastResponse())."\n";
		    print "</pre>";
	
		}
		
		public function action_testdownloadsports(){
			$wsdl = "http://diastole/diastole/media/soap/systoleSync.wsdl";
		    $client = new SoapClient($wsdl ,array(
		    "trace"      => 1,
		    "exceptions" => 0));
		
		
			$las = new downloadSports();
			$las->in = new last_entity_syncronized();
			$las->in->remote_id =1;
			$response = $client->__soapCall("downloadSports",array($las));
			print_r($response);
			
			print "<pre>";
		    print "Request :\n".htmlspecialchars($client->__getLastRequest()) ."\n";
		    print "Response:\n".htmlspecialchars($client->__getLastResponse())."\n";
		    print "</pre>";
			
			
		}
		
		
		public function action_testzend(){
			
		}
	}
?>